﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link href="../js/codemirror-3.11/lib/codemirror.css" rel="stylesheet" type="text/css" />
<script src="../js/codemirror-3.11/lib/codemirror.js" type="text/javascript"></script>
<script src="../js/codemirror-3.11/mode/htmlmixed/htmlmixed.js" type="text/javascript"></script>
<script src="../js/codemirror-3.11/mode/javascript/javascript.js" type="text/javascript"></script>
<script src="../js/codemirror-3.11/mode/xml/xml.js" type="text/javascript"></script>
<script src="../js/codemirror-3.11/mode/vbscript/vbscript.js" type="text/javascript"></script>
<script src="../js/codemirror-3.11/mode/css/css.js" type="text/javascript"></script>
<script src="../js/codemirror-3.11/addon/selection/active-line.js" type="text/javascript"></script>
<link href="../js/codemirror-3.11/doc/docs.css" rel="stylesheet" type="text/css" />
<style type="text/css">
    .CodeMirror
    {
        margin: 0 auto;
        width: 830px;
        height: 640px;
    }
    .CodeMirror-activeline-background
    {
        background: transparent !important;
    }
</style>

<head>
    <title></title>
</head>
<body>
    <div class="content_div">
        <div class="content_left_div">
            <div class="content_top_div">
            </div>
            <div class="content_middle_div">
                <form>
                <textarea id="code" name="code"></textarea></form>
                <script type="text/javascript" language="javascript">
                    var mixedMode = {
                        name: "htmlmixed",
                        scriptTypes: [{ matches: /\/x-handlebars-template|\/x-mustache/i,
                            mode: null
                        },
                      { matches: /(text|application)\/(x-)?vb(a|script)/i,
                          mode: "vbscript"
                      }]
                    };
                    var editor = CodeMirror.fromTextArea(document.getElementById("code"), { mode: mixedMode, tabMode: "indent" });
    </script>

               <!-- 运行-->
                <script type="text/javascript" language="javascript">
                    var is_ie = document.all;
                    function runcode() {
                   
                        var winname = window.open('', "_blank", '');
                        winname.document.open('code/html', 'replace');
                        winname.opener = null;
                        winname.document.write(editor.getValue());
                        winname.document.close();
                    }
                </script>
               <!-- /运行-->
            </div>
            <div class="content_footer_div">
            </div>
        </div>
        <div class="content_right_div">
            <div class="content_right_photo_div">
                <img src="../image/login_photo.jpg" />
            </div>
            <p class="content_right_title_div">
                HTML初版</p>
            <table class="content_right_function_table">
                <tr>
                    <td>
                        <a href="javascript:void(0);" onclick="runcode()" title="">运行</a>
                    </td>
                    <td>
                        <a href="#" title="">格式化</a>
                    </td>
                </tr>
            </table>
            <p class="content_right_name_div">
                ZCode</p>
        </div>
    </div>
</body>
</html>
